package com.hqq.behaviour.dependency_injection;

/**
 * AdvancedSorceress
 * 通过setter注入
 * Created by heqianqian on 2017/6/14.
 */
public class AdvancedSorceress implements Wizard {

    private Tobacco tobacco;

    public void setTobacco(Tobacco tobacco) {
        this.tobacco = tobacco;
    }

    @Override
    public void smoke() {
        tobacco.smoke(this);
    }
}
